import 'package:flutter/material.dart';

class Mine extends StatefulWidget {
  const Mine({Key? key}) : super(key: key);

  @override
  _MineState createState() => _MineState();
}

class _MineState extends State<Mine> {
  @override
  Widget build(BuildContext context) {
    return Container(
      color: const Color.fromARGB(1, 245, 245, 245),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.start,
        children: [
          Container( //顶部
            margin: const EdgeInsets.only(bottom: 10.0),
            padding: const EdgeInsets.fromLTRB(15, 0, 15, 0),
            decoration: const BoxDecoration(
              gradient: LinearGradient(
                colors: [Color(0xffffeded),Color(0xfffdfafa),Color(0xffffffff)],
                begin: Alignment.topCenter,
                end: Alignment.bottomCenter,
                stops: [0.1, 0.7, 0.9],
              )
            ),
            child: Column(
              children: [
                Padding( //个人信息
                  padding: const EdgeInsets.fromLTRB(0, 30, 0, 25),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.start,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: [
                      const SizedBox(  //头像
                        width: 64.5,
                        height: 64.5,
                        child: CircleAvatar(
                          backgroundImage: AssetImage('assets/images/user.jpg'),
                        ),
                      ),
                      Padding(
                        padding: const EdgeInsets.only(left: 12.0),
                        child: Column(
                          mainAxisAlignment: MainAxisAlignment.start,
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: const [
                            Text('志远', style: TextStyle(color: Colors.black, fontSize: 20.0, height: 1.5),),
                            Text('187****4489',  style: TextStyle(color: Color(0xff909292), fontSize: 12.0, height: 1.5),)
                          ],
                        ),
                      ),
                      Expanded(
                        flex: 1,
                        child: GestureDetector(
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.end,
                            crossAxisAlignment: CrossAxisAlignment.center,
                            children: const [
                              Text('账户管理 ', style: TextStyle(color: Color(0xff898a8a), fontSize: 13.0,)),
                              Icon(Icons.arrow_forward_ios_rounded, color: Color(0xff898a8a), size: 13.0,)
                            ],
                          ),
                          onTap: (){ print('查看账号详情'); },
                        ),
                      ),
                    ],
                  ),
                ),
                Column(
                  mainAxisAlignment: MainAxisAlignment.start,
                  children: [
                    GestureDetector(
                      onTap: (){ print('查看更多订单详情'); },
                      child: Padding(
                        padding: const EdgeInsets.only(bottom: 9.0),
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
                          crossAxisAlignment: CrossAxisAlignment.center,
                          children: [
                            const Text('我的订单', style: TextStyle(color: Colors.black, fontSize: 17.0,),),
                            Row(
                              mainAxisAlignment: MainAxisAlignment.end,
                              crossAxisAlignment: CrossAxisAlignment.center,
                              children: const [
                                Text('更多 ', style: TextStyle(color: Color(0xff898a8a), fontSize: 13.0,)),
                                Icon(Icons.arrow_forward_ios_rounded, color: Color(0xff898a8a), size: 13.0,)
                              ],
                            )
                          ],
                        ),
                      )
                    ),
                    Row(
                      mainAxisAlignment: MainAxisAlignment.spaceAround,
                      children: [
                        GestureDetector(
                          onTap: (){ print('查看待付款'); },
                          child: Padding(
                            padding: const EdgeInsets.fromLTRB(0, 18, 0, 18),
                            child: Column(
                              mainAxisAlignment: MainAxisAlignment.center,
                              crossAxisAlignment: CrossAxisAlignment.center,
                              children: const [
                                Icon(Icons.account_balance_wallet_outlined, size: 30, color: Color(0xcedc0520)),
                                Text('待付款', style: TextStyle(fontSize: 12.0),)
                              ],
                            ),
                          ),
                        ),
                        GestureDetector(
                          onTap: (){ print('查看待收货'); },
                          child: Padding(
                            padding: const EdgeInsets.fromLTRB(0, 18, 0, 18),
                            child: Column(
                              mainAxisAlignment: MainAxisAlignment.center,
                              crossAxisAlignment: CrossAxisAlignment.center,
                              children: const [
                                Icon(Icons.shopping_basket, size: 30, color: Color(0xcedc0520)),
                                Text('待收货', style: TextStyle(fontSize: 12.0),)
                              ],
                            ),
                          ),
                        ),
                        GestureDetector(
                          onTap: (){ print('查看待评价'); },
                          child: Padding(
                            padding: const EdgeInsets.fromLTRB(0, 18, 0, 18),
                            child: Column(
                              mainAxisAlignment: MainAxisAlignment.center,
                              crossAxisAlignment: CrossAxisAlignment.center,
                              children: const [
                                Icon(Icons.message_outlined, size: 30, color: Color(0xcedc0520)),
                                Text('待评价', style: TextStyle(fontSize: 12.0),)
                              ],
                            ),
                          ),
                        ),
                        GestureDetector(
                          onTap: (){ print('查看退货/退款进程'); },
                          child: Padding(
                            padding: const EdgeInsets.fromLTRB(0, 18, 0, 18),
                            child: Column(
                              mainAxisAlignment: MainAxisAlignment.center,
                              crossAxisAlignment: CrossAxisAlignment.center,
                              children: const [
                                Icon(Icons.euro_symbol, size: 30, color: Color(0xcedc0520)),
                                Text('退货/退款', style: TextStyle(fontSize: 12.0),)
                              ],
                            ),
                          ),
                        ),
                      ],
                    )
                  ],
                )
              ],
            ),
          ),
          Expanded(
            flex: 1,
            child: ListView(
              children: [
                Container(
                  decoration: const BoxDecoration(
                    color: Colors.white,
                    border: Border(bottom: BorderSide(width: 1.0, color: Color(0xfff3f3f3))),
                  ),
                  child: ListTile(
                    leading: const Icon(Icons.confirmation_number, size: 20, color: Color(0xff454545),),
                    title: Transform(
                      transform: Matrix4.translationValues(-24, 0, 0),
                      child: const Text('我的优惠券', style: TextStyle(fontSize: 14.0),),
                    ),
                    trailing: const Icon(Icons.arrow_forward_ios_rounded, color: Color(0xff898a8a), size: 14.0,),
                    onTap: (){ print('查看我的优惠券');},
                  ),
                ),
                Container(
                  decoration: const BoxDecoration(
                    color: Colors.white,
                    border: Border(bottom: BorderSide(width: 1.0, color: Color(0xfff3f3f3))),
                  ),
                  child: ListTile(
                    leading: const Icon(Icons.stars, size: 20, color: Color(0xff454545),),
                    title: Transform(
                      transform: Matrix4.translationValues(-24, 0, 0),
                      child: const Text('我的收藏', style: TextStyle(fontSize: 14.0),),
                    ),
                    trailing: const Icon(Icons.arrow_forward_ios_rounded, color: Color(0xff898a8a), size: 14.0,),
                    onTap: (){ print('查看我的收藏');},
                  ),
                ),
                Container(
                  decoration: const BoxDecoration(
                    color: Colors.white,
                    border: Border(bottom: BorderSide(width: 1.0, color: Color(0xfff3f3f3))),
                  ),
                  child: ListTile(
                    leading: const Icon(Icons.message_outlined, size: 20, color: Color(0xff454545),),
                    title: Transform(
                      transform: Matrix4.translationValues(-24, 0, 0),
                      child: const Text('我的评价', style: TextStyle(fontSize: 14.0),),
                    ),
                    trailing: const Icon(Icons.arrow_forward_ios_rounded, color: Color(0xff898a8a), size: 14.0,),
                    onTap: (){ print('查看我的评价');},
                  ),
                ),
                Container(
                  decoration: const BoxDecoration(
                    color: Colors.white,
                    border: Border(bottom: BorderSide(width: 1.0, color: Color(0xfff3f3f3))),
                  ),
                  child: ListTile(
                    leading: const Icon(Icons.place, size: 20, color: Color(0xff454545),),
                    title: Transform(
                      transform: Matrix4.translationValues(-24, 0, 0),
                      child: const Text('我的收货地址', style: TextStyle(fontSize: 14.0),),
                    ),
                    trailing: const Icon(Icons.arrow_forward_ios_rounded, color: Color(0xff898a8a), size: 14.0,),
                    onTap: (){ print('查看我的收货地址');},
                  ),
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}
